import request from '@/utils/request'

export const userRegisterService = (data) => request.post('/api/reg', data)

export const userLoginService = ({ username, password }) =>
  request.post('/api/login', { username, password })
// 获取用户的基本信息
export const userGetInfoService = () => request.get('/my/userinfo')
// 更新-用户头像
export const userUpdateAvatarService = (avatar) =>
  request.patch('/my/update/avatar', { avatar })
// 更新-用户密码
export const userUpdatePasswordService = (data) =>
  request.patch('/my/updatepwd', data)
// 更新-用户基本资料
export const userUpdateInfoService = (data) => request.put('/my/userinfo', data)
